<template>
  <div>
    <div id="navBtn">
      <el-button @click="btnHandler(1)">石料基础设置</el-button>
      <el-button @click="btnHandler(2)">商品资料基础设置</el-button>
      <el-button @click="btnHandler1(3)">产品编码表</el-button>
      <el-button @click="btnHandler1(4)">批发销售工费管理</el-button>
      <el-button>批发石料价格管理</el-button>
    </div>
    <GoodsSet v-show="flag"></GoodsSet>
    <ProductCode v-show="flag1 == 3"></ProductCode>
    <ProcessingFee v-show="flag1 == 4"></ProcessingFee>
  </div>
</template>

<script>
// import StoneSet from '@/views/aside/goods_set/StoneSet.vue'
import GoodsSet from '@/views/aside/goods_set/GoodsSet.vue'
import ProductCode from '@/views/aside/goods_set/ProductCode.vue'
import ProcessingFee from '@/views/aside/goods_set/ProcessingFee.vue'
export default {
  data(){
    return{
      flag:false,
      flag1:null,
    }
  },
  components:{
    ProductCode,
    GoodsSet,
    ProcessingFee
  },
  created(){
    this.$bus.$on('close_stone_temp',() =>{
      this.flag = false
      this.flag1 = null
    })
  },
  methods:{
    btnHandler(val){
      this.$bus.$emit('stone_flag',val)
      this.flag = true
      this.flag1 = null
    },
    btnHandler1(val){
      this.$bus.$emit('stone_flag',val)
      this.flag = false
      this.flag1 = val
    }
  },
}
</script>

<style lang="scss" scoped>
  #navBtn{
    margin-bottom: 20px;
  }
</style>